import pandas as pd
import numpy as np
import json

df = pd.DataFrame({'A':[1,2,3,4,5],'B':[6,7,8,9,10]})

print(json.dumps(df.keys().to_list()))